Marco Túlio Gontijo e Silva: Using sup-mail
Some time ago I wanted some features that evolution wouldn t give to me, such as a good user experience without using the mouse, and the possibility to use an external editor for writing e-mails. I always liked gmail web interface, but I don t like using software that I can t change or see the code, so I wanted threaded view, but I was not with a very high expectative of finding it, since I ve never seen it anywhere else. I tried icedove, sylpheed, claws and mutt, but none of them was good enough for me. I couldn t use very well icedove, sylpheed and claws only with the keyboard, and mutt wouldn t show me a list of folders with how many unread messages there was in each of them. mutt-patched tries to do this, but the number of messages aren t updated automatically. So I kept with evolution. At that time, I even tried evolution from experimental, which contained a plugin to use an external editor. The result was that I got even more crashes, and the external editor was not very nice. I gave up about it when I had to remove totem because of broken dependencies with the evolution from experimental. Some days ago Rafael (Pre ) Cunha de Almeida told me that he heard of this sup, and tried using it, but didn t like very much, because it was not good for accessing the mail from two different machines. As I use only my notebook most of the time, I decided to try it out. And i m liking it: it s mostly like gmail, but with a very good feature I don t remember seeing in gmail: you can kill a thread, and even if more mail arrives from that thread, it ll not be shown in your inbox. Other thing I liked about it is that it s highly customizable in Ruby, which made me feel a little bit like in XMonad. The first problem I found on it was the handling of UTF-8. I found this bug about it, and installed the recommended package, so it worked. I hope this correction, or the better one suggested here, get to Debian. I took a look at the Hooks page on the sup wiki, and used the fetchmail suggestion. I noticed that the code that was there in the time didn t worked here (maybe a bashism?):
fetchmail >& /dev/null
So I replaced it in the wiki with:
fetchmail 2>&1 > /dev/null
which worked here.
I wanted to create a new binding, to kill the thread, kill the buffer, and move to the next message in thread-view-mode, so I tried some possibilities without success, until I got to this, with the help of hyperbolis@#sup@irc.freenode.net:
class Redwood::ThreadViewMode
@@keymaps[self].add :kill_and_next,
"Kill this thread, kill buffer, and view next", '&'
def kill_and_next; kill_and_then :next end
def kill_and_then op
dispatch op do
multi_kill [@thread]
end
end
# From lib/modes/thread-index-mode.rb## m-m-m-m-MULTI-KILL
def multi_kill threads
UndoManager.register killing # threads.size.pluralize thread do
threads.each do t
t.remove_label :killed
add_or_unhide t.first
Index.save_thread t
end
regen_text
end threads.each do t
t.apply_label :killed
# hide_thread t
end regen_text
BufferManager.flash # threads.size.pluralize thread killed.
threads.each t Index.save_thread t
end
end This is the content of the file
~/.sup/hooks/startup.rb
. I copied a function from the source code of sup, commenting one line that was relative to that context.